﻿@model Blog.UI.Models.PostViewModel

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>       
        <legend>Create Post</legend>    
        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
            @Html.TextBoxFor(model => model.Title, new { @class = "box_shadow" })            
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Author)
            @Html.TextBoxFor(model => model.Author, new { @class = "box_shadow" })            
        </div>

        <div class="editor-label textarea">
            @Html.LabelFor(model => model.Body)
            @Html.TextAreaFor(model => model.Body, new { @class = "box_shadow" })            
        </div>

        <p>
            <input type="submit" value="create →" />
        </p>
    </fieldset>
}
@section lastArticles{
    @{Html.RenderAction("Last", "Posts");}
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
